home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-12-27 | 6.1 KB | 104 lines | [TEXT/ttxt] |
- FCB Inspector 1.01 is a freeware Control Panel that allows users to peek at a
- Macintosh’s list of open files. It also provides information about these files on demand and can
- close ones that aren’t crucial to system operation. Finally, it allows the maximum number of
- open files to be changed.
-
- To install it under System 6.0x, drag the FCB Inspector file icon into your System Folder
- and reboot.
-
- To install it under System Software 7.0, drag the FCB Inspector file icon over the System
- Folder icon and click OK to the dialog or drag it directly into the Control Panels folder and
- reboot. FCB Inspector provides balloon help in system 7.
-
- When FCB Inspector is opened, it immediately produces a list, located in the upper right
- pane, of all the currently open files (including itself) indicated by each’s file name. It
- continually checks for changes about which files are open and updates the list accordingly.
- Generally, the list is updated almost immediately after a change occurs. The information is
- gleaned directly (The Macintosh routine PBGetFCBInfo is not used because it skips certain files
- and would thus produce an incomplete list) from the Macintosh’s own internal list of open files
- known as the File Control Block Buffer, and each entry is called a File Control Block or FCB for
- short. Usually, the files appear in the list in the order that they were opened. An unnamed file
- is simply called “Unnamed File”. One of these unnamed files is the file containing a volume’s
- extents, which refers to information about the location of files on a volume, and the other is a
- file containing a volume’s catalog, which refers to information about the hierarchy of folders
- on a volume.
-
- To find out more about a particular open file, click on its name in the list or use the arrow
- keys to select it. FCB Inspector displays most of the information available in the Macintosh’s
- FCB list. Here’s a breakdown of this information field by field:
-
- ioVRefNum — volume reference number. A number that can be used to access information
- about the volume it specifies.
-
- ioRefNum — file reference number. A number that can be used to access information about
- the file it specifies. It is actually just an offset into the FCB buffer.
-
- ioFCBFlNm — file number. Apparently not used, this number is not related to file ID’s in
- System 7.
-
- ioFCBFlags — a flag byte describing some characteristics of the file. It is indicated in FCB
- Inspector with abbreviations: rd meaning read-only access, rdwr meaning read-write
- access; data meaning data fork open, res meaning resource fork open (files are divided into two
- forks or parts; generally, document files contain their data in data forks and have no resource
- forks whereas programs contain code and related material exclusively in their resource fork
- but have no data fork. Each open fork is a separate entry in the FCB); noMod meaning file (in the
- volume buffer) hasn’t been changed since last write, and mod meaning file has been modified
- since last write.
-
- ioFCBStBlk — first allocation block (space is managed in terms of allocation blocks, which
- are multiples of logical blocks. A logical block is 512 bytes) of file. Though, this field does not
- specify the actual value.
-
- ioFCBEOF — logical end of file. That is, the last byte in the file that contains data plus one
- (because the bytes are numbered from zero). This is the same as the size of the file.
-
- ioFCBPLen — physical end of file. That is, the last byte in the file’s last allocation block plus
- one (because the bytes are numbered from zero).
-
- ioFCBCrPs — current position or mark. The byte where the next read or write operation on
- the file will take place.
-
- ioFCBClpSiz — file’s clump size. The number of bytes (a multiple of the allocation block
- size) allocated when Allocate is called or end-of-file is reached during a Write routine.
-
- ioFCBParID — parent directory ID. The directory ID of the folder that contains the file.
-
- ioFCBFType — file type. A four-character constant indicating the file’s type, such as
- “APPL” for application, and “cdev” for Control Panel.
-
- To close a file in the list, select it and click the “Close” button. For files that are crucial to
- system operation such as the System file, the button is dimmed, and it is not possible to close
- them. This does not mean that just because the button is not dim, it is safe to close a file, and
- for that reason, it is necessary to click the button. Typing return or enter or double-clicking
- the filename has no effect. Mostly, the files you want to close are ones opened by a program
- you are developing and running. Be sure, however, that once you close a file in FCB Inspector
- that you don’t close it in your own code.
-
- FCB Inspector displays and can alter the maximum number of open files allowed. Contrary
- to the description in Inside Macintosh IV and other sources, the information in the boot blocks
- isn’t used. The number is derived by first dividing the total length of the FCB buffer, stored in
- the first word in the buffer, by the size of a single FCB, stored in the word pointed to by
- FSFCBLen, which is 94 bytes. Then two is subtracted from the result to eliminate size of the
- length word at the beginning of the buffer. The default number of open files is 40. To change this
- number, click and hold the arrow button in the second pane on the left of the FCB Inspector
- display until the desired number is reached in the “New Max” button. The minimum allowed is
- 10 and the maximum is 120. Finally, click the button, which dims to indicate that this new
- setting is now the one currently in effect. The change, which involves altering of the total
- length word of the FCB buffer and the size of the buffer accordingly, actually occurs at startup.
- Since the change occurs in memory only, FCB Inspector must be loaded at every startup that
- you wish the maximum number of open files to be altered.
-
- To disable FCB Inspector from loading at startup hold down the shift key in system 6.0x
- and the tab key in system 7.0.
-
- Distribution of FCB Inspector must be accompanied with this documentation.
-
- FCB Inspector comes from
-
- Maurice Volaski
-
- Internet: volaski@contra.med.buffalo.edu
-
- Address: 173 Princeton Ave. Apt #2, Amherst, NY 14226-5006
-
-